<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="/app/admin/component/layui/css/layui.css?v=2.8.12" />
    <link rel="stylesheet" href="/app/admin/component/pear/css/pear.css" />
    <link rel="stylesheet" href="/app/admin/admin/css/reset.css" />
</head>
<body class="pear-container">
<style>
    .layui-input-block input {
        width: 300px;
    }
</style>

<div class="layui-card">
    <div class="layui-card-body">

        <!-- 基本信息 -->
        <div class="layui-tab-item layui-show">

            <form class="layui-form">
                <div class="layui-form-item">
                    <label class="layui-form-label">审核中版本</label>
                    <div class="layui-input-block">
                        <input type="text" name="checking_versions" placeholder="" value="" class="layui-input first_input"  style="width: 100%">
                        <tip>多个用逗号,分开</tip>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">AI服务商</label>
                    <div class="layui-input-block">
                        <select name="ai_open" lay-verify="required" class="first_input">
                            <option value=""></option>
                            <option value="0">智增增</option>
                            <option value="1">千问</option>
                        </select>
                        <tip>如果没有选择，默认用智增增</tip>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">人脸识别开关</label>
                    <div class="layui-input-block">
                        <input type="text" name="facebody_open_close" placeholder="" value="" class="layui-input first_input">
                        <tip>1开 0关</tip>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">案例菜单开关</label>
                    <div class="layui-input-block">
                        <input type="text" name="example_open_close" placeholder="" value="" class="layui-input first_input" >
                        <tip>1开 0关</tip>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">升级弹出数次</label>
                    <div class="layui-input-block">
                        <input type="number" name="home_pop_ups" placeholder=""  value="3" class="layui-input first_input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">首页弹窗数次</label>
                    <div class="layui-input-block">
                        <input type="number" name="home_pop_windows" placeholder=""  value="3" class="layui-input first_input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">一级邀请码</label>
                    <div class="layui-input-block">
                        <input type="text" name="one_level_Invit_code" placeholder=""  value="" class="layui-input first_input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">二维码链接</label>
                    <div class="layui-input-block">
                        <input type="text" name="invit_qrcode_link" placeholder=""  value="" readonly class="layui-input first_input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">推文消费点</label>
                    <div class="layui-input-block" style="display: flex;flex-direction: row;align-items: center">
                        <input type="number" name="consume_point" placeholder=""  value="" class="layui-input first_input">
                        <tip style="color: red;font-size: 12px;">整体推文消费点数</tip>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">单图消费点</label>
                    <div class="layui-input-block" style="display: flex;flex-direction: row;align-items: center">
                        <input type="number" name="image_consume_point" placeholder=""  value="" class="layui-input first_input">
                        <tip style="color: red;font-size: 12px;">单张AI图片消费点数</tip>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">体验VIP赠送点数</label>
                    <div class="layui-input-block">
                        <input type="number" name="test_vip_give_point" placeholder=""  value="" class="layui-input first_input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">默认分成比例</label>
                    <div class="layui-input-block">
                        <input type="number" name="user_talent_rate" placeholder=""  value="" class="layui-input first_input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">优惠倒计时(秒)</label>
                    <div class="layui-input-block">
                        <input type="number" name="coupon_time" placeholder=""  value="" class="layui-input first_input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">原创视频(个)</label>
                    <div class="layui-input-block">
                        <input type="number" name="original_video_nums" placeholder=""  value="" class="layui-input first_input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">获得收益(元)</label>
                    <div class="layui-input-block">
                        <input type="number" name="user_income_amount" placeholder=""  value="" class="layui-input first_input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">月均收益(元)</label>
                    <div class="layui-input-block">
                        <input type="number" name="vip_month_avg_income_amount" placeholder=""  value="" class="layui-input first_input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">画面切换方案</label>
                    <div class="layui-input-block" style="display: flex;flex-direction: row;align-items: center">
                        <input type="number" name="clip_animtaion_scheme" placeholder=""  value="" class="layui-input first_input">
                        <tip style="color: red;font-size: 12px;">Int 0默认 不切换, 1 轮流切换，2 概率切换</tip>

                    </div>
                </div>
                <!--<div class="layui-form-item  top-search-from">-->
                    <!--<label class="layui-form-label">视频分辨率</label>-->
                    <!--<div class="layui-input-block">-->
                        <!--<input type="number" name="video_width" class="layui-input first_input inline-block" placeholder="宽 px">-->
                        <!-- - -->
                        <!--<input type="number" name="video_height" class="layui-input first_input inline-block" placeholder="高 px">-->
                    <!--</div>-->
                <!--</div>-->
                <div class="layui-form-item">
                    <label class="layui-form-label">跳转小程序链接</label>
                    <div class="layui-input-block">
                        <input type="text" name="goto_wechat_link" placeholder=""  value="" class="layui-input first_input" style="width: 100%">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">博主声音例子文案-中文</label>
                    <div class="layui-input-block">
                        <input type="text" name="timbre_example_text" placeholder=""  value="" class="layui-input first_input" style="width: 100%">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">博主声音例子文案-英文</label>
                    <div class="layui-input-block">
                        <input type="text" name="timbre_example_text_en" placeholder=""  value="" class="layui-input first_input" style="width: 100%">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">博主声音例子文案-泰语</label>
                    <div class="layui-input-block">
                        <input type="text" name="timbre_example_text_th" placeholder=""  value="" class="layui-input first_input" style="width: 100%">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">博主声音例子文案-印尼语</label>
                    <div class="layui-input-block">
                        <input type="text" name="timbre_example_text_id" placeholder=""  value="" class="layui-input first_input" style="width: 100%">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">默认GPT版本</label>
                    <div class="layui-input-block">
                        <input type="text" name="default_gpt_version" placeholder=""  value="" class="layui-input first_input" style="width: 100%">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">生成中文描述词AI指令</label>
                    <div class="layui-input-block">
                        <input type="text" name="analyze_content_ai_command" placeholder=""  value="" class="layui-input first_input" style="width: 100%">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">7猫后台token</label>
                    <div class="layui-input-block">
                        <input type="text" name="qi_cat_token" placeholder=""  value="" class="layui-input first_input" style="width: 80%">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">灰豚会话ID</label>
                    <div class="layui-input-block">
                        <input type="text" name="huitun_session_id" placeholder=""  value="" class="layui-input first_input" style="width: 80%">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">关键词注意事项</label>
                    <div class="layui-input-block">
                        <textarea  name="novel_spread_keyword_precautions" rows="8" class="layui-textarea first_input" style="width: 80%"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">英文描述词AI指令</label>
                    <div class="layui-input-block">
                        <textarea  name="prompt_ai_command" rows="6" class="layui-textarea first_input" style="width: 80%"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">原文分析指令</label>
                    <div class="layui-input-block">
                        <textarea  name="original_content_ai_command" rows="6" class="layui-textarea first_input" style="width: 80%"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">文章分段指令</label>
                    <div class="layui-input-block">
                        <textarea  name="content_parts_ai_command" rows="6" class="layui-textarea first_input" style="width: 80%"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">批量生成英文描述词AI指令</label>
                    <div class="layui-input-block">
                        <textarea  name="batch_prompt_ai_command" rows="15" class="layui-textarea first_input" style="width: 80%"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">AI图像指令</label>
                    <div class="layui-input-block">
                        <textarea  name="ai_image_command_template" rows="15" class="layui-textarea first_input" style="width: 80%"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">Hinovel推广文案</label>
                    <div class="layui-input-block">
                        <textarea  name="hinovel_promotion_words" rows="8" class="layui-textarea mutil_textarea" style="width: 60%"></textarea>
                        <tip>一行一个,@code 替换口令符</tip>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">违禁词</label>
                    <div class="layui-input-block">
                        <textarea  name="forbidden_words" rows="8" class="layui-textarea mutil_textarea" style="width: 40%"></textarea>
                        <tip>一行一个</tip>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">AI指令黑名单词汇</label>
                    <div class="layui-input-block">
                        <textarea  name="ai_command_blacklist_works" rows="10" class="layui-textarea mutil_textarea" style="width: 40%"></textarea>
                        <tip>一行一个</tip>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">AI指令采样器</label>
                    <div class="layui-input-block">
                        <textarea  name="ai_command_sampler_list" rows="10" class="layui-textarea mutil_textarea" style="width: 40%"></textarea>
                        <tip>一行一个</tip>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">AI指令Scheduler</label>
                    <div class="layui-input-block">
                        <textarea  name="ai_command_scheduler_list" rows="10" class="layui-textarea mutil_textarea" style="width: 40%"></textarea>
                        <tip>一行一个</tip>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">美摄转场KEY</label>
                    <div class="layui-input-block">
                        <textarea  name="meishe_transition_key" rows="10" class="layui-textarea mutil_textarea" style="width: 40%"></textarea>
                        <tip>一行一个</tip>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">美摄片段动画</label>
                    <div class="layui-input-block">
                        <textarea  name="meishe_part_clipanim" rows="10" class="layui-textarea mutil_textarea" style="width: 40%"></textarea>
                        <tip>一行一个,NONE 无、L2R 从左往右、R2L 从右往左、T2B 从上到下、B2T 从下到上、S2B 从小到大、B2S 从大到小</tip>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">通用描述词标签</label>
                    <div class="layui-input-block">
                        <textarea  name="common_prompt_tags" rows="10" class="layui-textarea mutil_textarea" style="width: 40%"></textarea>
                        <tip>一行一个,格式‘标签名||描述词’</tip>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">领取VI浮图</label>
                    <div class="layui-input-block">
                        <img class="img-3" src=""/>
                        <input type="text" style="display:none" name="receive_vip_image" value="" class="layui-input first_input"/>
                        <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="receive_vip_image"  permission="app.admin.upload.image">
                            <i class="layui-icon layui-icon-upload"></i>上传图片
                        </button>
                        <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="attachment-choose-receive_vip_image"  permission="app.admin.upload.attachment">
                            <i class="layui-icon layui-icon-align-left"></i>选择图片
                        </button>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">领取VIP二维码</label>
                    <div class="layui-input-block">
                        <fieldset class="table-search-fieldset" style="border: 1px solid #e6e6e6;color: #6b6b6b;">
                            <div class="layui-form-item">
                                <label class="layui-form-label">领取VIP二维码1</label>
                                    <div class="layui-input-block">
                                    <img class="img-3" src=""/>
                                    <input type="text" style="display:none" name="receive_vip_qrcode" value="" class="layui-input first_input"/>
                                    <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="receive_vip_qrcode"  permission="app.admin.upload.image">
                                        <i class="layui-icon layui-icon-upload"></i>上传图片
                                    </button>
                                    <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="attachment-choose-receive_vip_qrcode"  permission="app.admin.upload.attachment">
                                        <i class="layui-icon layui-icon-align-left"></i>选择图片
                                    </button>
                                </div>
                            </div>
                            <div class="layui-form-item"></div>
                                <label class="layui-form-label">领取VIP二维码2</label>
                                    <div class="layui-input-block">
                                    <img class="img-3" src=""/>
                                    <input type="text" style="display:none" name="receive_vip_qrcode_2" value="" class="layui-input first_input"/>
                                    <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="receive_vip_qrcode_2"  permission="app.admin.upload.image">
                                        <i class="layui-icon layui-icon-upload"></i>上传图片
                                    </button>
                                    <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="attachment-choose-receive_vip_qrcode_2"  permission="app.admin.upload.attachment">
                                        <i class="layui-icon layui-icon-align-left"></i>选择图片
                                    </button>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">联系客服二维码</label>
                    <div class="layui-input-block">
                        <fieldset class="table-search-fieldset" style="border: 1px solid #e6e6e6;color: #6b6b6b;">
                            <div class="layui-form-item">
                                <label class="layui-form-label">联系客服二维码1</label>
                                <div class="layui-input-block">
                                    <img class="img-3" src=""/>
                                    <input type="text" style="display:none" name="customer_service_qrcode" value="" class="layui-input first_input"/>
                                    <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="customer_service_qrcode"  permission="app.admin.upload.image">
                                        <i class="layui-icon layui-icon-upload"></i>上传图片
                                    </button>
                                    <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="attachment-choose-customer_service_qrcode"  permission="app.admin.upload.attachment">
                                        <i class="layui-icon layui-icon-align-left"></i>选择图片
                                    </button>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">联系客服二维码2</label>
                                <div class="layui-input-block">
                                    <img class="img-3" src=""/>
                                    <input type="text" style="display:none" name="customer_service_qrcode_2" value="" class="layui-input first_input"/>
                                    <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="customer_service_qrcode_2"  permission="app.admin.upload.image">
                                        <i class="layui-icon layui-icon-upload"></i>上传图片
                                    </button>
                                    <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="attachment-choose-customer_service_qrcode_2"  permission="app.admin.upload.attachment">
                                        <i class="layui-icon layui-icon-align-left"></i>选择图片
                                    </button>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">邀请海报</label>
                    <div class="layui-input-block">
                        <fieldset class="table-search-fieldset" style="border: 1px solid #e6e6e6;color: #6b6b6b;">
                            <div class="layui-form-item">
                                <label class="layui-form-label">邀请海报1</label>
                                <div class="layui-input-block">
                                    <img class="img-3" src=""/>
                                    <input type="text" style="display:none" name="invit_poster_image_1" value="" class="layui-input first_input"/>
                                    <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="invit_poster_image_1"  permission="app.admin.upload.image">
                                        <i class="layui-icon layui-icon-upload"></i>上传图片
                                    </button>
                                    <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="attachment-choose-invit_poster_image_1"  permission="app.admin.upload.attachment">
                                        <i class="layui-icon layui-icon-align-left"></i>选择图片
                                    </button>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">邀请海报2</label>
                                <div class="layui-input-block">
                                    <img class="img-3" src=""/>
                                    <input type="text" style="display:none" name="invit_poster_image_2" value="" class="layui-input first_input"/>
                                    <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="invit_poster_image_2"  permission="app.admin.upload.image">
                                        <i class="layui-icon layui-icon-upload"></i>上传图片
                                    </button>
                                    <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="attachment-choose-invit_poster_image_2"  permission="app.admin.upload.attachment">
                                        <i class="layui-icon layui-icon-align-left"></i>选择图片
                                    </button>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">邀请海报3</label>
                                <div class="layui-input-block">
                                    <img class="img-3" src=""/>
                                    <input type="text" style="display:none" name="invit_poster_image_3" value="" class="layui-input first_input"/>
                                    <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="invit_poster_image_3"  permission="app.admin.upload.image">
                                        <i class="layui-icon layui-icon-upload"></i>上传图片
                                    </button>
                                    <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" id="attachment-choose-invit_poster_image_3"  permission="app.admin.upload.attachment">
                                        <i class="layui-icon layui-icon-align-left"></i>选择图片
                                    </button>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">会员等级</label>
                    <div class="layui-input-block">
                        <fieldset class="table-search-fieldset" style="border: 1px solid #e6e6e6;color: #6b6b6b;">
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">V1</label>
                                <div class="layui-input-block">
                                    <fieldset class="table-search-fieldset" style="border: 1px solid #e6e6e6;color: #6b6b6b;">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">邀请人数</label>
                                            <div class="layui-input-block">
                                                <input type="number" name="vip_level1.invite_number" placeholder=""  value="" class="layui-input mutil_input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">分成比例(%)</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="vip_level1.income_rate" placeholder=""  value="" class="layui-input mutil_input">
                                            </div>
                                        </div>
                                    </fieldset>
                                </div>
                            </div>
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">V2</label>
                                <div class="layui-input-block">
                                    <fieldset class="table-search-fieldset" style="border: 1px solid #e6e6e6;color: #6b6b6b;">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">邀请人数</label>
                                            <div class="layui-input-block">
                                                <input type="number" name="vip_level2.invite_number" placeholder=""  value="" class="layui-input mutil_input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">分成比例(%)</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="vip_level2.income_rate" placeholder=""  value="" class="layui-input mutil_input">
                                            </div>
                                        </div>
                                    </fieldset>
                                </div>
                            </div>
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">V3</label>
                                <div class="layui-input-block">
                                    <fieldset class="table-search-fieldset" style="border: 1px solid #e6e6e6;color: #6b6b6b;">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">邀请人数</label>
                                            <div class="layui-input-block">
                                                <input type="number" name="vip_level3.invite_number" placeholder=""  value="" class="layui-input mutil_input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">分成比例(%)</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="vip_level3.income_rate" placeholder=""  value="" class="layui-input mutil_input">
                                            </div>
                                        </div>
                                    </fieldset>
                                </div>
                            </div>
                        </fieldset>

                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">版本更新</label>
                    <div class="layui-input-block">
                        <fieldset class="table-search-fieldset" style="border: 1px solid #e6e6e6;color: #6b6b6b;">
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">安卓</label>
                                <div class="layui-input-block">
                                    <fieldset class="table-search-fieldset" style="border: 1px solid #e6e6e6;color: #6b6b6b;">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">版本号</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="update_version_android.version_number" placeholder=""  value="" class="layui-input mutil_input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">H5下载地址</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="update_version_android.h5_download_path" placeholder=""  value="" class="layui-input mutil_input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">更新描述</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="update_version_android.update_desc" placeholder=""  value="" class="layui-input mutil_input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">apk包</label>
                                            <div class="layui-input-block">
                                                <button type="button" class="layui-btn layui-btn-normal" data-path="download"  id="version_apk_download">
                                                    <i class="layui-icon">&#xe67c;</i>上传文件
                                                </button>
                                                <span class="version_apk_download_parent" style="display: none;">
                                                    <span class="version_apk_download"></span>
                                                    <!--<a href='javascript:;'><i class="layui-icon layui-icon-delete btn-delete_image" data-elem="set_transparent_widget_course_cn_1" style="color: red; font-size: 25px;"></i></a>-->
                                                </span>
                                                <br/>
                                            </div>
                                            <input type="hidden" name="update_version_android.version_apk_download" value="" class="layui-input mutil_input"/>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">是否强制更新</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="update_version_android.is_force_update" placeholder=""  value="0" class="layui-input mutil_input">
                                                <tip>1是 0否</tip>
                                            </div>
                                        </div>
                                    </fieldset>
                                </div>
                            </div>
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">IOS</label>
                                <div class="layui-input-block">
                                    <fieldset class="table-search-fieldset" style="border: 1px solid #e6e6e6;color: #6b6b6b;">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">版本号</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="update_version_ios.version_number" placeholder=""  value="" class="layui-input mutil_input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">H5下载地址</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="update_version_ios.h5_download_path" placeholder=""  value="" class="layui-input mutil_input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">更新描述</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="update_version_ios.update_desc" placeholder=""  value="" class="layui-input mutil_input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">IOS链接</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="update_version_ios.ios_download_link" placeholder=""  value="" class="layui-input mutil_input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">是否强制更新</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="update_version_ios.is_force_update" placeholder=""  value="0" class="layui-input mutil_input">
                                                <tip>1是 0否</tip>
                                            </div>
                                        </div>
                                    </fieldset>
                                </div>
                            </div>


                        </fieldset>

                    </div>

                </div>


                <div class="bottom" style="position: fixed;">
                    <div class="button-container">
                        <button type="submit" class="pear-btn pear-btn-primary pear-btn-md" lay-submit="" lay-filter="save">
                            提交
                        </button>
                    </div>
                </div>
                <!--<div class="layui-form-item">-->
                    <!--<div class="layui-input-block">-->
                        <!--<button type="submit" class="pear-btn pear-btn-primary pear-btn-md" lay-submit="" lay-filter="save">-->
                            <!--提交-->
                        <!--</button>-->
                    <!--</div>-->
                <!--</div>-->
            </form>

        </div>

    </div>
</div>


<script src="/app/admin/component/layui/layui.js?v=2.8.12"></script>
<script src="/app/admin/component/pear/pear.js"></script>
<script src="/app/admin/admin/js/permission.js"></script>
<script src="/app/admin/admin/js/functions.js"></script>
<script src="/app/admin/admin/js/md5.js"></script>
<script>
    // 相关接口
    const PRIMARY_KEY = "id";
    const SELECT_API = "/app/admin/set/index/getparamsetting";
    const UPDATE_API = "/app/admin/set/index/saveparamsetting";

    // 获取数据库记录
    layui.use(["form", "util", "popup"], function () {
        let $ = layui.$;
        let form = layui.form;
        $.ajax({
            url: SELECT_API,
            dataType: "json",
            async:true,
            headers: get_header(),
            success: function (res) {
                // 给表单初始化数据
                $.each(res.data,function (i,v) {

                    if(v instanceof Array){
                        $('.mutil_textarea[name="'+i+'"]').val(v.join("\n"))
                    }else if(v instanceof Object){
                        $.each(v,function (ii,vv) {
                            if(vv instanceof Object){
                                $.each(vv,function (iii,vvv) {
                                    var name = i+'.'+ii+'.'+iii;
                                    $('.mutil_input[name="'+name+'"]').val(vvv);
                                })
                            }else{
                                var name = i+'.'+ii;
                                $('.mutil_input[name="'+name+'"]').val(vv);

                                if(ii=='version_apk_download'){
                                    $('.'+ii+'_parent').show();
                                    $('.'+ii).text(vv);
                                }else if(i=='promotion_type' || i=='promotion_platform'){
                                    $('.mutil_checkbox').each(function (ki,kv) {
                                        if($(kv).attr("name")==name){
                                            $('.mutil_checkbox[name="'+name+'"]').attr({"checked":"checked"});
                                        }
                                    })
                                }
                            }
                        })
                    }else{
                        if(v.indexOf("|@@|")>-1){
                            v = v.split("|@@|");
                            $('.mutil_textarea[name="'+i+'"]').val(v.join("\n"))
                        }else{
                            $('.first_input[name="'+i+'"]').val(v);
                        }

                        // if(i=='kol_business_qrcode' || i=='service_provider_qrcode' || i=='customer_service_qrcode' || i=='service_float_window'
                        //     || i=='invit_poster_image_1' || i=='invit_poster_image_2' || i=='invit_poster_image_3'){
                        //     $('.'+i).attr("src",v).parent('.'+i+'_parent').show();
                        // }
                    }
                })
                form.render('select');
                // 字段 图片地址 image_path
                layui.use(["upload", "layer"], function() {
                    let input = layui.$("#receive_vip_qrcode").prev();
                    input.prev().attr("src", input.val());
                    layui.$("#attachment-choose-receive_vip_qrcode").on("click", function() {
                        parent.layer.open({
                            type: 2,
                            title: "选择附件",
                            content: "/app/admin/upload/attachment?ext=jpg,jpeg,png,gif,bmp",
                            area: ["95%", "90%"],
                            success: function (layero, index) {
                                parent.layui.$("#layui-layer" + index).data("callback", function (data) {
                                    input.val(data.url).prev().attr("src", data.url);
                                });
                            }
                        });
                    });
                    layui.upload.render({
                        elem: "#receive_vip_qrcode",
                        acceptMime: "image/gif,image/jpeg,image/jpg,image/png",
                        url: "/app/admin/upload/image",
                        field: "__file__",
                        headers: get_header({}),
                        done: function (res) {
                            if (res.code > 0) return layui.layer.msg(res.msg);
                            this.item.prev().val(res.data.url).prev().attr("src", res.data.url);
                        }
                    });
                });

                // 字段 图片地址 image_path
                layui.use(["upload", "layer"], function() {
                    let input = layui.$("#receive_vip_qrcode_2").prev();
                    input.prev().attr("src", input.val());
                    layui.$("#attachment-choose-receive_vip_qrcode_2").on("click", function() {
                        parent.layer.open({
                            type: 2,
                            title: "选择附件",
                            content: "/app/admin/upload/attachment?ext=jpg,jpeg,png,gif,bmp",
                            area: ["95%", "90%"],
                            success: function (layero, index) {
                                parent.layui.$("#layui-layer" + index).data("callback", function (data) {
                                    input.val(data.url).prev().attr("src", data.url);
                                });
                            }
                        });
                    });
                    layui.upload.render({
                        elem: "#receive_vip_qrcode_2",
                        acceptMime: "image/gif,image/jpeg,image/jpg,image/png",
                        url: "/app/admin/upload/image",
                        field: "__file__",
                        headers: get_header({}),
                        done: function (res) {
                            if (res.code > 0) return layui.layer.msg(res.msg);
                            this.item.prev().val(res.data.url).prev().attr("src", res.data.url);
                        }
                    });
                });

                // 字段 图片地址 image_path
                layui.use(["upload", "layer"], function() {
                    let input = layui.$("#receive_vip_image").prev();
                    input.prev().attr("src", input.val());
                    layui.$("#attachment-choose-receive_vip_image").on("click", function() {
                        parent.layer.open({
                            type: 2,
                            title: "选择附件",
                            content: "/app/admin/upload/attachment?ext=jpg,jpeg,png,gif,bmp",
                            area: ["95%", "90%"],
                            success: function (layero, index) {
                                parent.layui.$("#layui-layer" + index).data("callback", function (data) {
                                    input.val(data.url).prev().attr("src", data.url);
                                });
                            }
                        });
                    });
                    layui.upload.render({
                        elem: "#receive_vip_image",
                        acceptMime: "image/gif,image/jpeg,image/jpg,image/png",
                        url: "/app/admin/upload/image",
                        field: "__file__",
                        headers: get_header({}),
                        done: function (res) {
                            if (res.code > 0) return layui.layer.msg(res.msg);
                            this.item.prev().val(res.data.url).prev().attr("src", res.data.url);
                        }
                    });
                });

                // 字段 图片地址 image_path
                layui.use(["upload", "layer"], function() {
                    let input = layui.$("#customer_service_qrcode").prev();
                    input.prev().attr("src", input.val());
                    layui.$("#attachment-choose-customer_service_qrcode").on("click", function() {
                        parent.layer.open({
                            type: 2,
                            title: "选择附件",
                            content: "/app/admin/upload/attachment?ext=jpg,jpeg,png,gif,bmp",
                            area: ["95%", "90%"],
                            success: function (layero, index) {
                                parent.layui.$("#layui-layer" + index).data("callback", function (data) {
                                    input.val(data.url).prev().attr("src", data.url);
                                });
                            }
                        });
                    });
                    layui.upload.render({
                        elem: "#customer_service_qrcode",
                        acceptMime: "image/gif,image/jpeg,image/jpg,image/png",
                        url: "/app/admin/upload/image",
                        field: "__file__",
                        headers: get_header({}),
                        done: function (res) {
                            if (res.code > 0) return layui.layer.msg(res.msg);
                            this.item.prev().val(res.data.url).prev().attr("src", res.data.url);
                        }
                    });
                });

                // 字段 图片地址 image_path
                layui.use(["upload", "layer"], function() {
                    let input = layui.$("#customer_service_qrcode_2").prev();
                    input.prev().attr("src", input.val());
                    layui.$("#attachment-choose-customer_service_qrcode_2").on("click", function() {
                        parent.layer.open({
                            type: 2,
                            title: "选择附件",
                            content: "/app/admin/upload/attachment?ext=jpg,jpeg,png,gif,bmp",
                            area: ["95%", "90%"],
                            success: function (layero, index) {
                                parent.layui.$("#layui-layer" + index).data("callback", function (data) {
                                    input.val(data.url).prev().attr("src", data.url);
                                });
                            }
                        });
                    });
                    layui.upload.render({
                        elem: "#customer_service_qrcode_2",
                        acceptMime: "image/gif,image/jpeg,image/jpg,image/png",
                        url: "/app/admin/upload/image",
                        field: "__file__",
                        headers: get_header({}),
                        done: function (res) {
                            if (res.code > 0) return layui.layer.msg(res.msg);
                            this.item.prev().val(res.data.url).prev().attr("src", res.data.url);
                        }
                    });
                });

                // 字段 图片地址 image_path
                layui.use(["upload", "layer"], function() {
                    let input = layui.$("#invit_poster_image_1").prev();
                    input.prev().attr("src", input.val());
                    layui.$("#attachment-choose-invit_poster_image_1").on("click", function() {
                        parent.layer.open({
                            type: 2,
                            title: "选择附件",
                            content: "/app/admin/upload/attachment?ext=jpg,jpeg,png,gif,bmp",
                            area: ["95%", "90%"],
                            success: function (layero, index) {
                                parent.layui.$("#layui-layer" + index).data("callback", function (data) {
                                    input.val(data.url).prev().attr("src", data.url);
                                });
                            }
                        });
                    });
                    layui.upload.render({
                        elem: "#invit_poster_image_1",
                        acceptMime: "image/gif,image/jpeg,image/jpg,image/png",
                        url: "/app/admin/upload/image",
                        field: "__file__",
                        headers: get_header({}),
                        done: function (res) {
                            if (res.code > 0) return layui.layer.msg(res.msg);
                            this.item.prev().val(res.data.url).prev().attr("src", res.data.url);
                        }
                    });
                });

                // 字段 图片地址 image_path
                layui.use(["upload", "layer"], function() {
                    let input = layui.$("#invit_poster_image_2").prev();
                    input.prev().attr("src", input.val());
                    layui.$("#attachment-choose-invit_poster_image_2").on("click", function() {
                        parent.layer.open({
                            type: 2,
                            title: "选择附件",
                            content: "/app/admin/upload/attachment?ext=jpg,jpeg,png,gif,bmp",
                            area: ["95%", "90%"],
                            success: function (layero, index) {
                                parent.layui.$("#layui-layer" + index).data("callback", function (data) {
                                    input.val(data.url).prev().attr("src", data.url);
                                });
                            }
                        });
                    });
                    layui.upload.render({
                        elem: "#invit_poster_image_2",
                        acceptMime: "image/gif,image/jpeg,image/jpg,image/png",
                        url: "/app/admin/upload/image",
                        field: "__file__",
                        headers: get_header({}),
                        done: function (res) {
                            if (res.code > 0) return layui.layer.msg(res.msg);
                            this.item.prev().val(res.data.url).prev().attr("src", res.data.url);
                        }
                    });
                });
                // 字段 图片地址 image_path
                layui.use(["upload", "layer"], function() {
                    let input = layui.$("#invit_poster_image_3").prev();
                    input.prev().attr("src", input.val());
                    layui.$("#attachment-choose-invit_poster_image_3").on("click", function() {
                        parent.layer.open({
                            type: 2,
                            title: "选择附件",
                            content: "/app/admin/upload/attachment?ext=jpg,jpeg,png,gif,bmp",
                            area: ["95%", "90%"],
                            success: function (layero, index) {
                                parent.layui.$("#layui-layer" + index).data("callback", function (data) {
                                    input.val(data.url).prev().attr("src", data.url);
                                });
                            }
                        });
                    });
                    layui.upload.render({
                        elem: "#invit_poster_image_3",
                        acceptMime: "image/gif,image/jpeg,image/jpg,image/png",
                        url: "/app/admin/upload/image",
                        field: "__file__",
                        headers: get_header({}),
                        done: function (res) {
                            if (res.code > 0) return layui.layer.msg(res.msg);
                            this.item.prev().val(res.data.url).prev().attr("src", res.data.url);
                        }
                    });
                });

                // 字段 文件 url
                layui.use(["upload", "layer", "popup", "util"], function() {
                    layui.upload.render({
                        elem: "#version_apk_download",
                        accept: "file",
                        data: {},
                        headers: get_header({}),
                        url: "/app/admin/upload/insert",
                        field: "__file__",
                        done: function (res) {
                            if (res.code) return layui.popup.failure(res.msg);

                            $('.version_apk_download').text(res.data.url).parent('.version_apk_download_parent').show();
                            $('input[name="update_version_android.version_apk_download"]').val(res.data.url);
                        }
                    });
                });
                // ajax返回失败
                if (res.code) {
                    layui.popup.failure(res.msg);
                }

            }
        });
    });

    //提交事件
    layui.use(["form", "popup"], function () {
        // 字段验证允许为空
        layui.form.verify({
            phone: [/(^$)|^1\d{10}$/, "请输入正确的手机号"],
            email: [/(^$)|^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/, "邮箱格式不正确"],
            url: [/(^$)|(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/, "链接格式不正确"],
            number: [/(^$)|^\d+$/,'只能填写数字'],
            date: [/(^$)|^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/, "日期格式不正确"],
            identity: [/(^$)|(^\d{15}$)|(^\d{17}(x|X|\d)$)/, "请输入正确的身份证号"]
        });
        layui.form.on("submit(save)", function (data) {
            var first_input = [];

            $.each($('.first_input'),function (i,v) {
                first_input.push({name:$(v).attr('name'),value:$(v).val()})
            })

            var mutil_textarea = [];
            $.each($('.mutil_textarea'),function (i,v) {
                mutil_textarea.push({name:$(v).attr('name'),value:$(v).val().split("\n")})
            })

            var mutil_input = [];
            $.each($('.mutil_input'),function (i,v) {
                mutil_input.push({name:$(v).attr('name'),value:$(v).val()})
            })
            $.each($('.mutil_checkbox'),function (i,v) {
                if($(v).next('.layui-form-checkbox').hasClass('layui-form-checked')){
                    mutil_input.push({name:$(v).attr('name'),value:$(v).val()})
                }
            })

            var param = {
                first_input:first_input,
                mutil_textarea:mutil_textarea,
                mutil_input:mutil_input,
            };

            layui.$.ajax({
                url: UPDATE_API,
                type: "POST",
                dateType: "json",
                data: param,
                async:true,
                headers: get_header(param),
                success: function (res) {
                    if (res.code) {
                        return layui.popup.failure(res.msg);
                    }
                    return layui.popup.success("操作成功", function () {
                        location.reload();
                    });
                }
            });
            return false;
        });
    });

</script>

</body>
</html>
